/**
 *	flowwhre模块条件的流程模块接口
 *	开发者：雨中磐石
 *	地址：www.rockoa.com
 *	日期：2023-07-19
 */

package com.framework.Module.flow.flowwhere;




import com.framerock.baselib.Json;
import com.framerock.baselib.Rock;
import com.framework.Flow.FlowListener;
import com.framework.Model.ModelMode;

import java.util.Map;


public class FlowListenerflowwhere extends FlowListener {



    public Boolean onModejs() { return true;}


    public Map<String, String> onDataafter()
    {
        int loadci  = Integer.parseInt(mRequest.get("loadci", "1"));

        Map<String, String> da = Rock.getMap();
        if(loadci == 1){
            da.put("modearr", Json.getListString(ModelMode.get(this.nDb).getMdearr()));
        }

        return da;
    }

    public Map<String, String> onDatabefore(){
        String modeid = mRequest.get("modeid", "0");
        String where  = "";
        if(!modeid.equals("0"))where  = "`modeid`="+modeid+"";
        return Rock.getMap(new String[]{
                "where", where
        });
    }
}
